"use client"
import { unstableSetRender} from 'antd';
import { createRoot } from 'react-dom/client';

const rootMap = new WeakMap<Element | DocumentFragment, ReturnType<typeof createRoot>>();

unstableSetRender((node, container) => {
    let root = rootMap.get(container);
    if (!root) {
        root = createRoot(container);
        rootMap.set(container, root);
    }
    root.render(node);

    return () =>
        new Promise<void>((resolve) => {
            setTimeout(() => {
                root?.unmount();
                rootMap.delete(container);
                resolve();
            }, 0);
        });
});
export default function Fix(){
    return null
}